create PROCEDURE  dbo.RuntableCompressionRowOn
as
begin


Declare @SQL nvarchar(2000);
set @SQL = 'alter table ? rebuild partition = all 
with (DATA_COMPRESSION  = row)' ;
set @SQL = @SQL+'; PRINT ' +' Row Data Compression on for table ?';

exec sp_MSforeachtable @SQL;

end

